package vip.specimen.system.datasource.entity.question;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import vip.specimen.system.datasource.entity.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * *@Author: 余浪人
 * *@Date：2021/4/22 16:47
 * *@Email:yulangren520@Gmail.com
 * *@QQ:1368419640
 **/
@Getter
@Setter
@Entity
@Table(name = "question_column")
public class QuestionColumnEntity extends BaseEntity {
    @ApiModelProperty(value = "分类名称")
    private String columnName;
    @ApiModelProperty(value = "排序")
    private Integer sequence = 0;
    @ApiModelProperty(value = "分类关键词")
    private String columnKeyword;
    @Column(length = 1024)
    @ApiModelProperty(value = "分类描述")
    private String columnDescription;
    @ApiModelProperty(value = "首页是否显示")
    private boolean indexIsShow = false;
    @ApiModelProperty(value = "上级分类")
    @ManyToOne
    private QuestionColumnEntity superior;

    public QuestionColumnEntity() {
    }

    public QuestionColumnEntity(String columnName, Integer sequence, String columnKeyword, String columnDescription, boolean indexIsShow, QuestionColumnEntity superior) {
        this.columnName = columnName;
        this.sequence = sequence;
        this.columnKeyword = columnKeyword;
        this.columnDescription = columnDescription;
        this.indexIsShow = indexIsShow;
        this.superior = superior;
    }
}
